<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>scp</title>
	<link href="scpunittest.css" rel="stylesheet" type="text/css">

	<script src="../scp.js"></script>
	<script src="../scp.diagnostics.js"></script>
	<script language=javascript>
	<!--

		__scp.prototype.UnitTests = function()
		{
			if (scp.diagnostics != null)
			{
				scp.diagnostics.assertNotNaN('Checking API Version', scp.apiversion);
				scp.diagnostics.assertNotNaN('getVars collection', scp.getVars().length);
				scp.diagnostics.assertTrue('setVar', scp.setVar('UnitTestVar', 'TestValue'));
				scp.diagnostics.assertEquals('getVar UnitTestVar', scp.getVar('UnitTestVar'), 'TestValue');
			}		
		}
	var m_sName = '<%=User.Name%>';
	//-->
	</script>
	
</head>
<body>
	<form>
	<img src="poweredbyscp537x36.gif">	
	<h1>SharpContent Client API - SCP Namespace</h1>	
	<p class="summary">This is the root namespace for the SharpContent Client API.  In addition to being the central location to access
	the object hierarchy, it offers some methods for transferring variables between client and server.</p>
	<div class="funccontent">
		<table>
			<tr>
				<td class="funcname">callPostBack</td>
				<td class="funcdesc">Initiates a postback call for the passed in action.  In order to work the action will need to be registered on the server side.</td>
			</tr>
			<tr>
				<td class="paramname">sAction</td>
				<td class="paramdesc">Action name to be raised</td>
			</tr>
			<tr>
				<td class="paramname">N Parameters</td>
				<td class="paramdesc">Pass in any number of parameters the postback requires.  Parameters should be in the form of 'paramname=paramvalue', 'paramname=paramvalue', 'paramname=paramvalue'</td>
			</tr>
			<tr><td colspan="2"><hr></td></tr>
			<tr>
				<td class="funcname">getVar</td>
				<td class="funcdesc">Gets value for passed in variable name set on the server side by the RegisterClientVariable method.</td>
			</tr>
			<tr>
				<td class="paramname">sKey</td>
				<td class="paramdesc">Name of parameter to retrieve value for</td>
			</tr>
			<tr>
				<td class="paramnameret">Returns</td>
				<td class="paramdesc">Returns value variable or null if not set</td>
			</tr>
			<tr><td colspan="2"><hr></td></tr>
			<tr>
				<td class="funcname">getVars</td>
				<td class="funcdesc">Gets array of name value pairs set on the server side by the RegisterClientVariable method.</td>
			</tr>
			<tr>
				<td class="paramnameret">Returns</td>
				<td class="paramdesc">Array of name value pairs</td>
			</tr>
			<tr><td colspan="2"><hr></td></tr>
			<tr>
				<td class="funcname">setVar</td>
				<td class="funcdesc">Sets value for variable to be sent to the server.</td>
			</tr>
			<tr>
				<td class="paramname">sKey</td>
				<td class="paramdesc">Name of parameter to set value for</td>
			</tr>
			<tr>
				<td class="paramname">sVal</td>
				<td class="paramdesc">Value for variable</td>
			</tr>
			<tr>
				<td class="paramnameret">Returns</td>
				<td class="paramdesc">true when successful</td>
			</tr>
			<tr><td colspan="2"><hr></td></tr>
		</table>
	</div>
	<textarea id="__SCPDebugOutput" rows="10" cols="100" class="unittestcontent" NAME="__SCPDebugOutput"></textarea>
	<br>
	<input type="button" onclick="scp_diagnosticTests(scp);" value="Unit Tests" ID="Button1" NAME="Button1">
	</form>
</body>
</html>
